package shiyan.Javawebshiyan.shiyan2.src;// ShowInformation.java
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;

public class ShowInformation extends GenericServlet {

    @Override
    public void service(ServletRequest request, ServletResponse response)
            throws ServletException, IOException {

        response.setContentType("text/html;charset=utf-8");
        PrintWriter out = response.getWriter();
        out.println("<html><body>");
        out.println("<h2>个人信息</h2>");
        out.println("<p>专业：计算机科学与技术</p>");
        out.println("<p>班级：软件工程1班</p>");
        out.println("<p>学号：123456789</p>");
        out.println("<p>姓名：张三</p>");
        out.println("<p>性别：男</p>");
        out.println("<p>年龄：20</p>");
        out.println("</body></html>");
    }
}